<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>移动梦想</title>
<script src="<?php echo Yii::app()->baseUrl?>/js/jquery.min.js" type="text/javascript"></script>
<link href="<?php echo Yii::app()->baseUrl?>/css/main.css" rel="stylesheet" />
<script>
var controllerId = "<?php echo yii::app()->controller->id;?>";
var actionId     = "<?php echo Yii::app()->controller->action->id;?>";
</script>
<?php 
$controllerId =  yii::app()->controller->id;
$actionId     =  Yii::app()->controller->action->id;

?>
</head>
<body class="main">
<div class="infobox">
    <div style="margin-left:20px; margin-top:20px; line-height:20px; font-size:12px;">
    尊敬的客户，欢迎您！<br />
    登录帐号：<?php echo $this->userInfo["Name"]?><bR />
    显示名称：<?php echo $this->userInfo["DisplayName"]?> <br />
    </div>
</div>
<div class="left_title" style="border-bottom:none">
    <div class="font12 b" style="line-height:24px;">&nbsp;&nbsp;菜单</div>
</div>
<div class="border" id="left_menu" style="height:320px; overflow-y:scroll;  border-top:none">
    <?php
        foreach($list as $key => $row){
            $menu = '';
            foreach($row['submod'] as $subkey => $submod){
                $url = Yii::app()->urlManager->createUrl($submod['url']);
                $menu .= <<<MOD
                    <li class="sub_li_menu"><a href="{$url}" target="mainframe">{$submod['name']}</a></li>   
MOD;
            }
            echo <<<TPL
            <ul id="ul_{$key}">
                <li id="li_ul_{$key}">{$row['name']}</li>
                <ul class="sub_ul_menu" id="sub_ul_{$key}">
                    {$menu}
                </ul>
            </ul>            
TPL;
        }
        ?>
</div>
    </body>
    <script>
$(document).ready(function(){
	defaultShow();
})

function defaultShow(){
	$("li[id^=li_ul_]").each(function(){
	
		$(this).click(function(){
			var id = $(this).attr("id");
			id = id.split('_');
			id = id[1]+"_"+id[2];
			if($("#sub_"+id).css("display") == 'block'){
				return false;
			}
			$("ul[id^=sub_ul_]").each(function(){
				$(this).slideUp("slow");
			});
			
			
			$("#sub_"+id).slideDown("slow"); 
		});
	});
}
</script>
</html>